<?php
namespace LC\EntityBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="Track")
 *
 * @author Ralf Almon 21.06.2013
 */
class Track {
	/**
	 * @ORM\Id
	 * @ORM\Column(type="integer")
	 * @ORM\GeneratedValue(strategy="AUTO")
	 */
	protected $id;
	
	/**
	 * @ORM\Column(type="string",length=2048)
	 */
	protected $description;
	
	/**
	 * @ORM\Column(type="decimal",scale=2)
	 */
	protected $altitude_difference;
	
	/**
	 * @ORM\Column(type="decimal", scale=2)
	 */
	protected $length;
	
	//tbi
	protected $gps_log;
	
	/**
	 * @ORM\OneToMany(targetEntity="Tour", mappedBy="track");
	 */
	protected $touren;
	
	
	/**
	 * @ORM\ManyToOne(targetEntity="Biker", inversedBy="tracks");
	 * @ORM\JoinColumn(name="bikernick", referencedColumnName="nick");
	 */
	protected $discoverer;
	
	
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->touren = new \Doctrine\Common\Collections\ArrayCollection();
    }

    
    
    /**
     * -------------------------------Getters and Setters - Boring ------------------------------------
     */    
    
    
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Track
     */
    public function setDescription($description)
    {
        $this->description = $description;
    
        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set altitude_difference
     *
     * @param float $altitudeDifference
     * @return Track
     */
    public function setAltitudeDifference($altitudeDifference)
    {
        $this->altitude_difference = $altitudeDifference;
    
        return $this;
    }

    /**
     * Get altitude_difference
     *
     * @return float 
     */
    public function getAltitudeDifference()
    {
        return $this->altitude_difference;
    }

    /**
     * Set length
     *
     * @param float $length
     * @return Track
     */
    public function setLength($length)
    {
        $this->length = $length;
    
        return $this;
    }

    /**
     * Get length
     *
     * @return float 
     */
    public function getLength()
    {
        return $this->length;
    }

    /**
     * Add touren
     *
     * @param \LC\EntityBundle\Entity\Tour $touren
     * @return Track
     */
    public function addTouren(\LC\EntityBundle\Entity\Tour $touren)
    {
        $this->touren[] = $touren;
    
        return $this;
    }

    /**
     * Remove touren
     *
     * @param \LC\EntityBundle\Entity\Tour $touren
     */
    public function removeTouren(\LC\EntityBundle\Entity\Tour $touren)
    {
        $this->touren->removeElement($touren);
    }

    /**
     * Get touren
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getTouren()
    {
        return $this->touren;
    }

    /**
     * Set discoverer
     *
     * @param \LC\EntityBundle\Entity\Biker $discoverer
     * @return Track
     */
    public function setDiscoverer(\LC\EntityBundle\Entity\Biker $discoverer = null)
    {
        $this->discoverer = $discoverer;
    
        return $this;
    }

    /**
     * Get discoverer
     *
     * @return \LC\EntityBundle\Entity\Biker 
     */
    public function getDiscoverer()
    {
        return $this->discoverer;
    }
}